import { AppComponentBase } from '@shared/common/app-component-base';
import {
    ContentConfig, PagedContentInput
} from '@shared/service-proxies/service-proxies';
import { LazyLoadEvent } from 'primeng/api';
import { contentListComponent } from './list/content-list.component';
import { ContentDetailModalComponent } from './detail/content-detail-modal.component';
import { OrderByModalComponent } from '../shared/order-by/order-by-modal.component';
import { IContentBaseComponent } from './IContentBaseComponent';

export interface IContentComponent extends AppComponentBase, IContentBaseComponent {

    contentListTab: contentListComponent;
    contentDetailModal: ContentDetailModalComponent;

    orderByModal: OrderByModalComponent;  

    isLoading: boolean;

    kind: number;
    customKey: string;
    relateId: string;

    isModal: boolean;

    permissionDic: { [key: string]: boolean };

    pageConfig: ContentConfig;

    hiddenList: boolean;
    hiddenDetail: boolean;

    inputPara: PagedContentInput;

    getListData(event?: LazyLoadEvent): void;

    editModal(record : any): void;

    create(): void;

    goRelatePage(data: IGoRelatePageDto): void;

    gotoDetail(id: string);

    reloadPage();
}

export interface IGoRelatePageDto {
    id: string,
    relateDataCustomKey: string,
    relateDataContentType: string,
    displayName: string
}
